Skip to content

chore(ported_static): sync from forks/amsterdam onto snøbal/4#2783

Open
leolara wants to merge 5 commits intoethereum:devnets/snøbal/4from
leolara:wt-snobal-4
Open

chore(ported_static): sync from forks/amsterdam onto snøbal/4#2783
leolara wants to merge 5 commits intoethereum:devnets/snøbal/4from
leolara:wt-snobal-4

Conversation

@leolara
Copy link
Copy Markdown
Member

@leolara leolara commented Apr 30, 2026

🗒️ Description

Three related changes to tests/ported_static/ on devnets/snøbal/4:

  1. Sync the directory with the up-to-date version on forks/amsterdam (e7043ccce, PR feat(scripts): use dynamic addresses in ported static tests #2695 "use dynamic addresses in ported static tests"), preserving the snøbal-specific work.
  2. Prune amsterdam_skip_list.txt from 5 469 → 455 entries — only those that match a currently-failing fork_Amsterdam parametrization on snøbal/4.
  3. Cherry-pick PR fix(tests) fix ported quadratic complexity tests #2784 (open against forks/amsterdam): correct post-state expectations for four stQuadraticComplexityTest cases.

Sync (commit 1)

The sync is mechanical and reversible: a small script (.mb/sync-ported-static-snobal-4/sync.sh, not committed) computes three sets — files differing between origin/forks/amsterdam and HEAD; files modified on snøbal/4 since the merge-base; files marked @manually-enhanced on either side — and applies git checkout / git rm for the symmetric difference. Counts:

Files
Total differing under tests/ported_static/ 2 074
Snøbal-modified since merge-base (preserved) 606
@manually-enhanced on either side (preserved) 28 (14 .py + 14 .pyc cache hits)
Checked out from forks/amsterdam 1 467
Deleted (removed upstream by PR #2695) 1 (stTimeConsuming/test_sstore_combinations_initial.py, deprecated by the *_paris.py splits already in the directory)

Skip list prune (commit 2)

Running --fork Amsterdam -m "not slow" on the post-sync working tree without the skip list produces:

Phase Passed Failed Skipped Total
With original skip list (5 469 entries) 17 199 0 1 731 18 930
With no skip list 17 565 1 365 0 18 930
With pruned skip list (455 entries) 17 565 0 1 365 18 930

So 366 fork_Amsterdam parametrizations were being needlessly skipped (test source was updated by PR #2695 / addresses are now dynamic / the test no longer exists). The remaining 1 365 still fail with EIP-8037-related post-state assertions (KeyValueMismatchError, BalanceMismatchError, MissingAccountError, etc. — see .mb/sync-ported-static-snobal-4/skipped-failures.json for the full classification). Fixing those is real test-engineering work, out of scope here.

The pruned list keeps exactly the entries that match at least one of those 1 365 failing nodeids; section-header counts updated to reflect actual contents.

stQuadraticComplexityTest post-state fixes (commits 3-4)

Cherry-pick of PR #2784 (forks/amsterdam → snøbal/4). Four tests in stQuadraticComplexityTest/ (all marked @pytest.mark.slow, so excluded from CI's normal -m "not slow" runs) had post-state expectations that didn't match the actual fill output. PR #2784 corrects them; verified passing here under --fork Cancun (these tests carry valid_until("Prague"), so Amsterdam isn't in their range):

24 passed in 16.64s

Trace verification (full sync + prune, all forks)

Run Items Passed Failed Verified Diffs
Baseline (-m "not slow") 60 476 60 476 0
Verify (exact-no-stack-no-gas) 60 476 60 476 0 40 616 78
Verify (after PR #2772 cherry-picked locally) 60 476 60 476 0 40 616 0

The 78 diffs in the second row are explained by the disk/in-memory tracer asymmetry that PR #2772 fixes — confirmed by hand-cherry-picking PR #2772 into this branch and re-running, which clears them. Once #2772 lands on forks/amsterdam and propagates here, this sync verifies cleanly with no manual work.

Coverage caveat — Amsterdam skip list

The 1 365 still-skipped fork_Amsterdam parametrizations were not exercised in either the all-forks fill or the trace verify (Amsterdam isn't in the default parametrization range, so without --fork Amsterdam they don't get generated, and with --fork Amsterdam they're skipped by conftest.py/amsterdam_skip_list.txt). Their traces have not been compared. Fixing the underlying EIP-8037 post-state issues is out of scope for this sync PR.

🔗 Related Issues or PRs

✅ Checklist

  • All: Ran fast static checks to avoid unnecessary CI fails, see also Code Standards and Enabling Pre-commit Checks:
    just static
  • All: PR title adheres to the repo standard - it will be used as the squash commit message and should start type(scope):.
  • All: Considered updating the online docs in the ./docs/ directory.
  • All: Set appropriate labels for the changes (only maintainers can apply labels).
  • Tests: Ran mkdocs serve locally and verified the auto-generated docs for new tests in the Test Case Reference are correctly formatted.
  • Tests: For PRs implementing a missed test case, update the post-mortem document to add an entry the list.
  • Ported Tests: All converted JSON/YML tests from ethereum/tests or tests/static have been assigned @ported_from marker.

…changes

Sync 1467 ported_static test files from origin/forks/amsterdam (e7043cc)
to pick up upstream test maintenance, notably PR ethereum#2695 "use dynamic
addresses in ported static tests". Files modified on snøbal/4 since the
merge-base with forks/amsterdam (606) and files marked @manually-enhanced
(14) are preserved.

Also delete tests/ported_static/stTimeConsuming/test_sstore_combinations_initial.py,
removed upstream in PR ethereum#2695 (deprecated by the *_paris.py splits that
already live in the directory).
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (devnets/snøbal/4@befad1c). Learn more about missing BASE report.

Additional details and impacted files
@@                 Coverage Diff                 @@
##             devnets/snøbal/4    #2783   +/-   ##
===================================================
  Coverage                    ?   86.68%           
===================================================
  Files                       ?      599           
  Lines                       ?    37848           
  Branches                    ?     3821           
===================================================
  Hits                        ?    32807           
  Misses                      ?     4503           
  Partials                    ?      538           
Flag Coverage Δ
unittests 86.68% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…ing entries

The list previously contained 5469 entries — many for tests that pass on
snøbal/4 today (test source updated, addresses now dynamic, etc.) or for
tests that no longer exist after PR ethereum#2695's regeneration. Empirically:

- With the bloated list: 17199 passed, 1731 skipped, 0 failed.
- With no list:          17565 passed, 0 skipped, 1365 failed (gas).
- After this prune:      17565 passed, 1365 skipped, 0 failed.

The remaining 455 entries are exactly those that match a currently-
failing fork_Amsterdam parametrization (still legitimate
InsufficientTransactionGasError under EIP-8037's two-dimensional gas
model). Section-header counts updated to reflect the actual contents.
@leolara leolara marked this pull request as ready for review April 30, 2026 09:41
Three of these tests embed the runtime caller address directly in
their target contract's bytecode. The expected post hashed in a
literal hex string of the bytecode that hardcoded the pre-dynamic
EOA address (e.g. \`0xd9b97c712eb…\`), so once \`pre.fund_eoa()\`
started picking addresses dynamically the deployed code no longer
matched the expected hex. Hoist the bytecode into a \`target_code\`
variable used both at deploy time and as the expected \`code\`, so
the address baked in via \`Op.CALL(address=addr, …)\` is whatever
\`addr\` resolves to at fill time:

- \`test_call50000\`
- \`test_callcode50000\`
- \`test_call20_kbytes_contract50_2\`

\`test_quadratic_complexity_solidity_call_data_copy\` had a
different drift: its post asserted empty storage on \`contract_0\`,
but the success path (\`g=1\`, 250M gas) commits \`SSTORE(0, 50000)\`
before entering the loop. Make the expected storage \`g\`-conditional
so \`g=0\` (OOG) keeps an empty \`storage\` and \`g=1\` records slot 0.
@leolara leolara marked this pull request as draft April 30, 2026 11:09
…ly-enhanced

The four post-state corrections cherry-picked from PR ethereum#2784 should not be
overwritten the next time `tests/ported_static/` is regenerated by
`scripts/filler_to_python`. Add the `@manually-enhanced` marker to each
docstring so the regenerator skips them.
@leolara leolara marked this pull request as ready for review April 30, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants